import request from '../request.js'
// 播放 - 列表 http://192.168.0.139:263/api/bofang/getList
export function bofang_list(params) {
    return new Promise((resolve, reject)=>{
        request.get("/api/bofang/getList", params).then((result)=>{
            resolve(result)
        }).catch(err=>{
            reject(err)
        });
    });
}
// 播放 - 添加播放 http://192.168.0.139:263/api/bofang/add_log
export function add_log(params) {
    return new Promise((resolve, reject)=>{
        request.post("/api/bofang/add_log", params).then((result)=>{
            resolve(result)
        }).catch(err=>{
            reject(err)
        });
    });
}

// 删除播放
export function delete_log(params) {
    return new Promise((resolve, reject)=>{
        request.get("/api/bofang/delete", params).then((result)=>{
            resolve(result)
        }).catch(err=>{
            reject(err)
        });
    });
}

// 播放 - 课程收听完成 http://192.168.0.139:263/api/bofang/getList
export function shouting_wancheng(params) {
    return new Promise((resolve, reject)=>{
        request.get("/api/kecheng/shoutingwancheng", params).then((result)=>{
            resolve(result)
        }).catch(err=>{
            reject(err)
        });
    });
}
